<template>
  <el-card class="box-card">
    <div class="learn_info" slot="header">
      <div>成绩查询</div>
      <!-- <p>|</p>
        <div>已结束课程</div> -->
    </div>
    <div class="cardBox">
      <el-table :data="list">
        <el-table-column prop="school.schoolName" label="学校">
          <!-- <template slot-scope="scope">
          {{ $store.state.school?.profile.find(item => item.schoolId === scope.row.schoolId)?.schoolName }}
        </template> -->
        </el-table-column>
        <el-table-column prop="courses.coursename" label="课程名">
        </el-table-column>
        <el-table-column prop="score" label="成绩">
        </el-table-column>
        <el-table-column prop="examtime" label="考试时间">
        </el-table-column>
      </el-table>
    </div>
  </el-card>
</template>

<script>
import { getScoreByStuNo } from '@/api/score'
export default {
  data() {
    return {
      list: []
    }
  },
  mounted() {
    const stuNo = this.$store.state.user.profile.stuNo
    getScoreByStuNo(stuNo).then(res => {
      this.list = res.data
    })
  }
}
</script>

<style lang="less" scoped>
.cardBox {
  min-height: 300px;
}
</style>